def judge(n):
    n=str(n);
    n1=int(n[0]);
    n2=int(n[1]);
    n3=int(n[2]);
    n=int(n);
    if n==n1**3+n2**3+n3**3:
        return 1;
    else:
        return 0;

for i in range(100,1000,1):
    if judge(i)==1:
        print(i,end=" ");
    else:
        pass;